home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / News Stacks / Jan.'91AMUG News™.cpt / Jan.'91AMUG News™ / card_28479.txt < prev    next >
Text File  |  1990-12-30  |  2KB  |  44 lines

  1. -- card: 28479 from stack: in.'91AMUG News‚Ñ¢
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3780
  5. -- name: Word
  6.  
  7.  
  8. -- part contents for background part 2
  9. ----- text -----
  10. 17
  11.  
  12. -- part contents for background part 9
  13. ----- text -----
  14. Prograph
  15.  
  16. -- part contents for background part 8
  17. ----- text -----
  18. ..........................By Mark Gardner
  19.  
  20. -- part contents for background part 1
  21. ----- text -----
  22. int recursive_factorial(int input)
  23. {
  24. if (input <= 1)
  25. return 1;
  26. else
  27. return (input * recursive_factorial(input-1));
  28. }
  29.  
  30. A Class By Itself
  31. Being graphically based is a big help when it comes to object-oriented programming. Opening the class window allows you to see the class hierarchy graphically displayed. Each link connects a class with its sub-class. In figure 3, the menu class is a sub-class of the system class. If you had need of a different kind of menu, you could click on the menu class icon to select it and while holding down the option key (which rubber bands a link 
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39. -- part contents for background part 10
  40. ----- text -----
  41. from the selected icon), click somewhere below to create a new class icon. You would then type in the name of your new class. Your new class would inherit all the attributes and methods of the menu class. Double clicking on the left side of a class icon opens a window of class attributes with their distinctive triangular, arrow-like icons. By clicking in the window you can add more attributes that the menu class doesn‚Äôt have. Double clicking on an attribute‚Äôs icon opens a window shows the default value of the attribute and allows you to change the value. Double clicking on the right side of a class icon opens a window of class methods. Clicking in the window will create a new class method. If you name that 
  42. method the same 
  43. name as an 
  44. inherited method,